<div
    {{ attributes }}
>
    {% if isSuccessful %}
        <div>Welcome {{ newUserEmail }}!</div>
    {% else %}
        {{ form_start(form, {
            attr: {
                novalidate: true,
                'data-action': 'live#action:prevent',
                'data-live-action-param': 'saveRegistration',
            }
        }) }}
            {{ form_row(form.email) }}
            {{ form_row(form.password) }}
            {{ form_row(form.terms) }}

            <button
                type="submit"
                class="btn btn-primary {{ this.hasValidationErrors ? 'disabled' : '' }}"
            >Register</button>

            {{ form_rest(form) }}
        {{ form_end(form) }}
    {% endif %}
</div>
